package com.lx.stereotype;

import org.springframework.core.annotation.AliasFor;
import org.springframework.stereotype.Component;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 注入handler注解
 *
 * @author 段誉
 * @create 2019-05-15 13:49
 */
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
//指定Handler的类型为Component
@Component
public @interface Handler {
  /**
   * annotation：将value指向Component中的value的值
   * 具体怎么用参考博客:https://www.jianshu.com/p/869ed7037833
   * @return
   */
  @AliasFor(annotation = Component.class)
  String value() default "";
}
